package sk.avicularia.core.data;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import sk.avicularia.core.dao.AccessDAO;

/**
* Entita mapujuca strukturu access
* 
* @author leaflock
* @since  0.1
*/
@Entity
@Table(name = AccessDAO.TABLE_NAME)
public class Access implements Serializable
{

	/**
	 * @see Serializable
	 */
	private static final long	serialVersionUID	= -7343475397818405900L;
	
	/**
	 * Id zaznamu
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "ID", nullable = false)
	private Long id;
	
	/**
	 * Pravo vytvarania zaznamu
	 */
	@Column(name = AccessDAO.COLUMN_CREATED_ACCESS, nullable = false)
	private Boolean create_access = false;
	
	/**
	 * Pravo mazania zaznamu
	 */
	@Column(name = AccessDAO.COLUMN_DELETE_ACCESS, nullable = false)
	private Boolean delete_access = false;
	
	/**
	 * Pravo updatovania zaznamu
	 */
	@Column(name = AccessDAO.COLUMN_UPDATE_ACCESS, nullable = false)
	private Boolean update_access = false;
	
	/**
	 * Pravo citania zaznamu
	 */
	@Column(name = AccessDAO.COLUMN_READ_ACCESS, nullable = false)
	private Boolean read_access = false;

	public Long getId()
	{
		return id;
	}

	public void setId(Long id)
	{
		this.id = id;
	}

	public Boolean getCreate_access()
	{
		return create_access;
	}

	public void setCreate_access(Boolean create_access)
	{
		this.create_access = create_access;
	}

	public Boolean getDelete_access()
	{
		return delete_access;
	}

	public void setDelete_access(Boolean delete_access)
	{
		this.delete_access = delete_access;
	}

	public Boolean getUpdate_access()
	{
		return update_access;
	}

	public void setUpdate_access(Boolean update_access)
	{
		this.update_access = update_access;
	}

	public Boolean getRead_access()
	{
		return read_access;
	}

	public void setRead_access(Boolean read_access)
	{
		this.read_access = read_access;
	}	
}
